package  com.colourclash.fruitopia.events
{
	import flash.events.Event;
	
	/**
	 * ...
	 * @author Patrick
	 */
	public class PropertyChangeEvent extends Event
	{
		public static const PROPERTY_CHANGE:String = "propertyChange";
		
		public var propertyName:String;
		
		public var sender:Object;
		
		public var args:Array;
		
		public function PropertyChangeEvent(type:String, sender:Object, propertyName:String, args:Array, bubbles:Boolean = false, cancelable:Boolean = false)
		{
			this.propertyName = propertyName;
			
			this.args = args;
			
			this.sender = sender;
			
			super(type, bubbles, cancelable);
		
		}
		
		public override function clone():Event
		{
			return new PropertyChangeEvent(type, sender, propertyName, args, bubbles, cancelable);
		}
		
		public override function toString():String
		{
			return formatToString("PropertyChangeEvent", "type", "sender", "propertyName", "args", "bubbles", "cancelable", "eventPhase");
		}
	
	}

}